
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import 'LFormLogic.dart';
import 'LFormState.dart';

class LFormPage extends StatelessWidget {

  const LFormPage({super.key, required this.tag});
  final String tag;

  @override
  Widget build(BuildContext context) {
    final LFormState state = Get.find<LFormLogic>(tag: tag).state;
    state.tag = tag;


    return Card(
      elevation: 0,
      margin: const EdgeInsets.all(10),
      child: GetBuilder<LFormLogic>(
        // id: state.formId,
        // assignId:true,
        // autoRemove:true,
        tag: tag,
        builder: (logic){
          return Form(
            key: state.formKey,
            child: Column(
              children: logic.createFormItes()
            ),
          );
        },
      )
    );

  }

}